How to use soft and hard assertion with example